<template>
  <div class="SearchMovielist">
    <img :src="item.poster" alt="" />
    <div class="SearchMovielists">
      <div class="SearchMovielist-l">
        <span class="one">{{ item.name }}</span>
        <p class="ena">{{ item.ename }}</p>
        <p class="cat">{{ item.catogary }}</p>
        <p class="rel">{{ item.release }}</p>
      </div>
      <div class="SearchMovielist-r">
        <span class="wish" v-if="item.wish > 0">{{ item.wish }}<i>人想看</i></span>
        <span class="no" v-else>暂无评分</span>
        <div class="link-buy link" v-if="item.wish > 0">想看</div>
        <div class="link-buy buy" v-else>购票</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["item"],
};
</script>

<style lang="less" scoped>
.SearchMovielist {
  padding: 12px 0px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e6e6e6;

  &:nth-last-child(3) {
    border-bottom: 0;
  }

  img {
    width: 64px;
    height: 90px;
    margin-right: 10px;
  }
  .SearchMovielists {
    display: flex;
    .SearchMovielist-l {
      width: 183px;
      .one {
        font-size: 17px;
        color: #222222;
        display: inline-block;
        font-weight: 700;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
      .ena,
      .cat,
      .rel {
        margin-top: 2px;
        font-size: 13px;
        color: #666666;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
    }
    .SearchMovielist-r {
      width: 100px;
      display: flex;
      margin-right: 5px;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      .wish {
        color: #fa0;
        font-size: 16px;
        padding-left: 5px;
        i {
          font-size: 12px;
        }
      }
      .no {
        font-size: 14px;
        color: #777;
      }
      .link-buy {
        width: 54px;
        height: 28px;
        margin: 8.5px 0px;
        text-align: center;
        border-radius: 14px;
        font-size: 13px;
        line-height: 28px;
        background-color: #faaf00;
        border: none;
        color: #fff;
        box-shadow: 0 2px 2px 0 rgb(250 175 0 / 15%);
      }
      .link {
        background-color: #faaf00;
      }
      .buy {
        background-color: #F03D37;
      }
    }
  }
}
</style>